<template>
	<b-layout-index>
		<navbar bgcolor="#fff" :title="$t('提现记录')"></navbar>
		<u-sticky bgColor="#fff">
			<u-tabs current="current" :list="list1" @click="click"></u-tabs>
		</u-sticky>
		<view class="">
			<block v-for="(item,index) in list.list">
				<view class="mg-top-10">
					<shop-order-withdrawal :item="item" />
				</view>
			</block>
		</view>
		<loading v-if="loading" />
	</b-layout-index>
</template>

<script>
	//findByMyWithdrawalList
	import {
		findByMyWithdrawalList
	} from "@/api/userWallet.js"
	export default {
		data() {
			return {
				priceAll: 0,
				list1: [{
						icon: 'icon-qianbao',
						name: this.$t("全部"),
						status: 0
					},

					{
						icon: 'icon-tuisong',
						name: this.$t("已通过"),
						status: 1
					},
					{
						icon: 'icon-chazhao',
						name: this.$t("审核中"),
						status: 2
					},
					{
						icon: 'icon-shangcheng',
						name: this.$t("未通过"),
						status: 3
					}
				],
				current: 0,
				page: 0,
				list: {
					current: 0,
					list: [],
					pages: 0,
					size: 0,
					total: 0
				},
				loading: false
			}
		},
		onLoad: function() {
			this.findByMyListData(0)
		},
		methods: {
			getData: function() {
				var the = this;
				getByBanksList().then(res => {
					console.log(res)
					the.cardList = res;
				})
			},
			findByMyListData: function(status) {
				this.loading = true;
				var param = {
					status: status,
					current: this.page
				}
				findByMyWithdrawalList(param).then(res => {
					this.list = res
					this.loading = false;
				}).catch(e => {
					this.loading = false;
				})
			},
			click: function(e) {
				console.log(e)
				this.loading = true;
				this.list = []
				this.findByMyListData(e.status)
			}
		}
	}
</script>

<style>
</style>